'use strict';

var myApp = angular.module("myApp", ['ngRoute', 'ngCookies', 'ui.bootstrap']);
    
    
myApp.config(['$routeProvider', function($routeProvider) {
    $routeProvider.when('/login', {
        templateUrl: 'views/html/login.html',
        controller: 'auth'
    });
    
    $routeProvider.when('/viewMeal', {
        templateUrl: 'views/html/view2.html',
        controller: 'viewMealController'
    });
    
    $routeProvider.when('/viewMeal/:mealId', {
        templateUrl: 'views/html/viewMeal.html',
        controller: 'viewMealDetailsController'
    });
    
    $routeProvider.when('/postmeal', {
        templateUrl: 'views/html/view1.html',
        controller: 'postMealController'
    });
    
    $routeProvider.when('/mycart', {
        templateUrl: 'views/html/myCart.html',
        controller: 'cartController'
    });
    
    $routeProvider.when('/trackstatus', {
        templateUrl: 'views/html/trackstatus.html',
        controller: 'RatingDemoCtrl'
    });
    
    $routeProvider.when('/chefpayment', {
        templateUrl: 'views/html/chefpayment.html',
        controller: 'viewController'
    });
    
    $routeProvider.when('/userconfirmation', {
        templateUrl: 'views/html/userConfirmation.html',
        controller: 'viewController'
    });
    
    $routeProvider.when('/mealreview/:mealid', {
        templateUrl: 'views/html/mealreview.html',
        controller: 'mealReviewController'
    });
    
    $routeProvider.otherwise({
        redirectTo: "/login"
    });
}]);